/*
 * Recursion.cpp
 *
 *  Created on: Feb 21, 2014
 *      Author: tony
 */



#include <iostream>
using namespace std;

int factorial(int n){
	cout << "  --> n is " << n << endl;
	if (n == 0 )
		return 1;
	int result = 0;
	result = n * factorial( n - 1 );
	return result;
}
int main(void){
	cout << "Basic Recursion" << endl;
	int N = 4;
	int fact = factorial( N );
	cout << "The factorial of " << N << " is " << fact << endl;
}


